<template>
  <div class="welcome">
    <div class="welcome-detail">
      <span>Welcome to，Evan lian Test Demo</span>
      <span>
        <router-link :to="{path:'/about'}">进入</router-link>
      </span>
      <span>{{now|nowFormat()}}</span>
    </div>
  </div>
</template>

<script>
import * as util from "@/util";
export default {
  data() {
    return {
      now: new Date()
    };
  },
  created() {},
  computed: {},
  components: {},
  mounted(){
    
    var isLogin = this.$route.query.loginFlag;
    if(isLogin){
      this.$router.push({
        name:"home"
      })
    }else{
      this.$router.push({
        name:"login"
      })
    }
  },
  filters: {
    nowFormat(val, type) {
      return util.transYearMothDay(val, type);
    }
  }
};
</script>
<style lang="less" scoped>
.welcome {
  display: flex;
  height: 500px;
  justify-content: center;
  align-items: center;
  .welcome-detail {
    margin: auto;
    background: #0099cc;
    width: 50%;
    height: 40%;
    color: aliceblue;
    font-size: 24px;
    border-radius: 10px;
    span {
      display: flex;
      height: 25%;
      justify-content: center;
      align-items: center;
      a {
        color: aliceblue;
      }
    }
  }
}
</style>

